package com.diandi.signature.service.impl.contract;

import com.diandi.signature.contract.FddArchivesContractService;
import com.diandi.signature.fddtools.FddUtil;
import com.diandi.signature.url.GsonUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * 合同归档
* @author mwz
* @create 2017-08-31 20:10
* @version V1.0.0
*/

@Service
public class FddArchivesContractServiceImpl implements FddArchivesContractService {
    private static Logger logger = LoggerFactory.getLogger( FddArchivesContractServiceImpl.class );


    @Override
    public Map<String, String> fddArchivesContract(Map<String, String> paramMap) {
        String platTradeNo = paramMap.get("platTradeNO");
        logger.info("--rcv:platTradeNo:"+platTradeNo+":[合同生成->合同归档]：开始处理合同归档"+paramMap.toString()+"--");
        String contractNo = paramMap.get("contractNo");
        Map<String,String> returnMap =  new HashMap<String,String>();
        String result = FddUtil.invokeContractFilling( contractNo);
        logger.info("--rcv:platTradeNo:"+platTradeNo+":[合同生成->合同归档]: 完成合同归档：result："+result+"--");
        return returnMap = GsonUtil.fronJson2Map(result);
    }
}
